﻿@using WebApp.Common
@using WebApp.Extensions

<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->
<head>

    <!-- Basic -->
    <meta charset="utf-8">
    <title>@ViewBag.CurrentPage.Title</title>
    <meta name="keywords" content="agileforce" />
    <meta name="description" content="sanelib - your one stop solution">
    <meta name="author" content="sanelib.com">
    <meta name="google-site-verification" content="Fr1Clz70-pviEnnGIqexOPEBfRkaAZNPjgI5aQrc9Is" />

    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Browser Icon -->
    <link type="image/x-icon" rel="Shortcut icon" href="@Url.Content("~/Public/img/favicon.ico")" />

    <!-- Web Fonts  -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800|Shadows+Into+Light" rel="stylesheet" type="text/css">

    <!-- 3rd-party styles -->
    @Styles.Render("~/bundles/bootstrapcss")

    @Bundles.Render("~/bundles/screencss", new { media = "screen" })

    @Styles.Render("~/bundles/themecss", "~/bundles/overriddencss")

    <!-- Page-specific styles -->
    @RenderSection("Styles", false)

    @Scripts.Render("~/bundles/headlibs")

    @*<script src="@Url.Content("~/public/vendor/modernizr.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.plugins.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.easing.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.appear.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.cookie.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.pubsub.js")"></script>
        <script src="@Url.Content("~/public/vendor/jquery.shortcut.js")"></script>
        <script src="@Url.Content("~/public/vendor/json2.js")"></script>
        <script src="@Url.Content("~/public/vendor/knockout.js")"></script>
        <script src="@Url.Content("~/public/vendor/moment.js")"></script>
        <script src="@Url.Content("~/public/vendor/underscore.js")"></script>
        <script src="@Url.Content("~/public/api/date.extensions.js")"></script>
        <script src="@Url.Content("~/public/vendor/bootstrap.js")"></script>*@
    
    <!--[if IE]>
    <link rel="stylesheet" href="@Url.Content("~/public/css/ie.css")">
    <![endif]-->
    <!--[if lte IE 8]>
    <script src="@Url.Content("~/public/vendor/respond.js")"></script>
    <![endif]-->
  
    <script src="@Url.Content("~/public/vendor/jquery.signalr.js")"></script>
    <script src="@Url.Content("~/signalr/hubs")"></script>    
      
    <script type="text/javascript">

        $(function () {
            // Declare a proxy to reference the hub. 
            var service = $.connection.serviceChatHub;
            // Create a function that the hub can call to broadcast messages.
            service.client.showMessage = function (message) {
                alert(message);
            };

            $.connection.hub.start().done(function () {});
        });

    </script>

</head>
<body>

    @{
        ViewBag.CurrentUser = UserContext.GetCurrentUser();
        var currentPage = (PageSetting)ViewBag.CurrentPage;
    }

    <div class="body">

        @Html.Partial("_Header")

        <div role="main">

            @if (string.IsNullOrEmpty(currentPage.BannerPartial))
            {
                <section class="page-top" id="innerHeader">
                    <div class="container">
                        <div class="row">
                            <div class="col-md-12">
                                @Html.PagePathList(currentPage)
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">
                                <h2>@currentPage.PageName</h2>
                            </div>
                            <div class="col-md-8">
                                <nav class="pull-right">
                                    @RenderSection("QuickLinks", false)
                                </nav>
                            </div>
                        </div>
                    </div>
                </section>
            }
            else
            {
                Html.RenderPartial(currentPage.BannerPartial);
            }

            @RenderBody()

        </div>

        @Html.Partial("_Footer")

    </div>

    <!-- Messages -->
    <div>
        <div id="BusyIndicator" class="alert alert-success" style="display: none; text-align: center; top: 0;position: fixed; z-index: 90000; ">Working</div>
        <div id="SuccessMessage" class="alert alert-success" style="display: none; text-align: center; top: 0;position: fixed; z-index: 90000; "></div>
        <div id="FailureMessage" class="alert alert-danger" style="display: none; text-align: center; top: 0; position: fixed; z-index: 90000; "></div>
        <div id="ajax-validation-errors" class="alert alert-danger" style="display: none; text-align: center; top: 0; position: fixed; z-index: 90000; "></div>
        <div id="infoElm" style="display: none; position: fixed; z-index: 90000; "></div>
    </div>

    <input type="file" id="inputFile" name="inputFile" class="hidden" />

    @Html.Partial("_ModalBox")

    <!-- ========================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- 3rd-party scripts -->
    @Scripts.Render("~/bundles/libs")

    <script type="text/javascript" src="@Url.Content("~/Public/vendor/require.js")" data-main="@Url.Content("~/Public/api/main.js")"> </script>

    <!-- Partials scripts (if any) -->
    @Html.RenderScripts()

    <!-- Page-specific scripts -->
    @RenderSection("Scripts", false)

    <!-- Google Analytics -->
    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments);
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
                m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

        ga('create', 'UA-43979332-1', 'sanelib.com');
        ga('send', 'pageview');

    </script>
</body>
</html>
